//
//  OrderDetailsTVCell.m
//  Logistics
//
//  Created by enzhoukeji on 2018/8/10.
//  Copyright © 2018年 puyue.com. All rights reserved.
//

#import "OrderDetailsTVCell.h"

@implementation OrderDetailsTVCell
-(void)loadViews {
    self.destinationLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:13] withColor:[UIColor blackColor] withText:@"承运人信息"];
    self.headImage = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"touxiangMN"]];
    self.nameLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:13] withColor:[UIColor blackColor] withText:@"马可波罗"];
    self.numberLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:13] withColor:[UIColor blackColor] withText:@"已运输100单"];
    self.telButton = [UIButton buttonWithTitle:@"电话" withImageName:nil withBGColor:nil Withlayer:NO];
    [self.telButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    self.telButton.layer.borderWidth = 1.0;
    self.telButton.layer.borderColor = [UIColor grayColor].CGColor;
    self.telButton.titleLabel.font = [UIFont systemFontOfSize:13];
    self.telButton.layer.cornerRadius = 5;
    [self.telButton addTarget:self action:@selector(telButtonC:) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:self.destinationLabel];
    [self addSubview:self.headImage];
     [self addSubview:self.nameLabel];
    [self addSubview:self.numberLabel];
    [self addSubview:self.telButton];
    
}
-(void)layoutViews {
    [self.destinationLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.top.mas_equalTo(GTFixHeightFlaot(10));
        make.height.mas_equalTo(GTFixHeightFlaot(15));
        make.width.mas_equalTo(self.destinationLabel);
    }];
    [self.headImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.top.mas_equalTo(self.destinationLabel.mas_bottom).offset(GTFixHeightFlaot(10));
        make.height.height.mas_equalTo(GTFixHeightFlaot(40));
    }];
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.headImage.mas_right).offset(GTFixWidthFlaot(10));
        make.top.mas_equalTo(self.destinationLabel.mas_bottom).offset(GTFixHeightFlaot(10));
        make.height.mas_equalTo(GTFixHeightFlaot(15));
        make.width.mas_equalTo(self.nameLabel);
    }];
    [self.numberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.headImage.mas_right).offset(GTFixWidthFlaot(10));
        make.top.mas_equalTo(self.nameLabel.mas_bottom).offset(GTFixHeightFlaot(10));
        make.height.mas_equalTo(GTFixHeightFlaot(15));
        make.width.mas_equalTo(self.numberLabel);
    }];
    [self.destinationLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(0);
        make.top.mas_equalTo(self.headImage.mas_centerY);
        make.height.mas_equalTo(GTFixHeightFlaot(20));
        make.width.mas_equalTo(GTFixWidthFlaot(40));
    }];
    
}
-(void)telButtonC:(UIButton *)btn {
    
}
@end

@implementation OrderDetailsTVCellSrcond
-(void)loadViews {
    self.bigView = [UIView new];
    self.bigView.layer.borderColor = [UIColor grayColor].CGColor;
    self.bigView.layer.borderWidth = 1.0;
    self.massLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:13] withColor:[UIColor blackColor] withText:@"货物信息"];
    self.provenanceLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:12] withColor:[UIColor blackColor] withText:@"济南"];
    self.jiantouImage = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"jiantou"]];
    self.destinationLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:12] withColor:[UIColor blackColor] withText:@"北京 海淀"];
    
    self.leghtLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:12] withColor:[UIColor blackColor] withText:@"车长：22M"];
    self.volumeLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:12] withColor:[UIColor blackColor] withText:@"重量/体积：8880kg"];
    
    self.typeLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:12] withColor:[UIColor blackColor] withText:@"货物类型"];
    self.sendLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:12] withColor:[UIColor blackColor] withText:@"装卸方式"];
    self.paymentLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:12] withColor:[UIColor blackColor] withText:@"付款方式"];
    self.timeLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:12] withColor:[UIColor blackColor] withText:@"发布时间:2017-03-29 13:33"];
    [self addSubview:self.bigView];
    [self.bigView addSubview:self.massLabel];
    [self.bigView addSubview:self.provenanceLabel];
    [self.bigView addSubview:self.jiantouImage];
    [self.bigView addSubview:self.destinationLabel];
    [self.bigView addSubview:self.leghtLabel];
    [self.bigView addSubview:self.volumeLabel];
    [self.bigView addSubview:self.typeLabel];
    [self.bigView addSubview:self.sendLabel];
    [self.bigView addSubview:self.paymentLabel];
    [self.bigView addSubview:self.timeLabel];
}
-(void)layoutViews{
    [self.bigView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.top.mas_equalTo(0);
        make.bottom.mas_equalTo(0);
        make.right.mas_equalTo(0);
    }];
    [self.massLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(GTFixWidthFlaot(5));
        make.top.mas_equalTo(GTFixHeightFlaot(10));
        make.height.mas_equalTo(GTFixHeightFlaot(15));
        make.width.mas_equalTo(self.destinationLabel);
    }];
    [self.provenanceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(GTFixWidthFlaot(10));
        make.top.mas_equalTo(self.massLabel.bottom).offset(GTFixHeightFlaot(5));
        make.height.mas_equalTo(GTFixHeightFlaot(15));
        make.width.mas_equalTo(self.provenanceLabel.mas_width);
    }];
    [self.jiantouImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.provenanceLabel.mas_right).offset(GTFixWidthFlaot(5));
        make.top.mas_equalTo(self.massLabel.bottom).offset(GTFixHeightFlaot(10));
        make.height.mas_equalTo(GTFixHeightFlaot(10));
        make.width.mas_equalTo(GTFixHeightFlaot(20));
    }];
    [self.destinationLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.jiantouImage.mas_right).offset(GTFixWidthFlaot(5));
        make.top.mas_equalTo(self.massLabel.bottom).offset(GTFixHeightFlaot(5));
        make.height.mas_equalTo(GTFixHeightFlaot(15));
        make.width.mas_equalTo(self.destinationLabel.mas_width);
    }];
    [self.leghtLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(GTFixWidthFlaot(10));
        make.top.mas_equalTo(self.provenanceLabel.mas_bottom).offset(GTFixHeightFlaot(5));
        make.height.mas_equalTo(GTFixHeightFlaot(15));
        make.width.mas_equalTo((self.width - 20)/3);
    }];
    [self.volumeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.leghtLabel.mas_right).offset(GTFixWidthFlaot(0));
        make.top.mas_equalTo(self.provenanceLabel.mas_bottom).offset(GTFixHeightFlaot(5));
        make.height.mas_equalTo(GTFixHeightFlaot(15));
        make.width.mas_equalTo((self.width - 20)/3);
    }];
    [self.typeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.volumeLabel.mas_right).offset(GTFixWidthFlaot(0));
        make.top.mas_equalTo(self.provenanceLabel.mas_bottom).offset(GTFixHeightFlaot(5));
        make.height.mas_equalTo(GTFixHeightFlaot(15));
        make.width.mas_equalTo((self.width - 20)/3);
    }];
    [self.sendLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(GTFixWidthFlaot(10));
        make.top.mas_equalTo(self.leghtLabel.bottom).offset(GTFixHeightFlaot(15));
        make.height.mas_equalTo(GTFixHeightFlaot(15));
        make.width.mas_equalTo(self.sendLabel.mas_width);
    }];
    [self.paymentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.sendLabel.mas_right).offset(GTFixWidthFlaot(20));
        make.top.mas_equalTo(self.leghtLabel.bottom).offset(GTFixHeightFlaot(15));
        make.height.mas_equalTo(GTFixHeightFlaot(15));
        make.width.mas_equalTo(self.paymentLabel.mas_width);
    }];
    [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(GTFixWidthFlaot(10));
        make.top.mas_equalTo(self.sendLabel.bottom).offset(GTFixHeightFlaot(15));
        make.height.mas_equalTo(GTFixHeightFlaot(15));
        make.width.mas_equalTo(self.timeLabel.mas_width);
    }];
    
}
@end









